<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>留言 - 会员中心 -{$sitename}</title>
{include file="center_include"/}
<script type="text/javascript">
		function setupLabel(){
            if($('.label-checkbox input').length) {
                $('.label-checkbox').each(function(){
                    $(this).removeClass('label-checkbox-on');
                });
                $('.label-checkbox input:checked').each(function(){
                    $(this).parent('label').addClass('label-checkbox-on');
                });
            };
            if($('.label-radio input').length) {
                $('.label-radio').each(function(){
                    $(this).removeClass('label-radio-on');
                });
                $('.label-radio input:checked').each(function(){
                    $(this).parent('label').addClass('label-radio-on');
                });
            };
        }  
		function initLabelEvent(){
			$(".user-img-list li").hover(function(){
				$(this).find(".ui-del").show();
			},function(){
				$(this).find(".ui-del").hide();
			});

			$('.label-checkbox').click(function(){
				setupLabel();
			});

			setupLabel();
		}
	</script>
</head>
<body>
{include file="center_header"/}
<!-- // i-header end -->
<div id="content" class="layout">
  <div class="ui-box ui-qire fn-clear" id="i-box">
    <div id="i-bar">
 {include file="center_nav"/} 
 {include file="center_fk"/}
    </div>
    <!-- // i-bar end -->
    <div class="i-box-cnt" id="i-cnt">
      <div id="i-subscribe">
        <div class="ui-title i-tab-nav-box fn-clear">
          <ul class="i-tab-nav">
            <li class="current"><a href="#" hidefocus>我的私信</a></li>
            <!--<li class="line"></li>-->
            <!--<li><a href="#" hidefocus>我的发件箱</a></li>-->
          </ul>
        </div>
        <div class="ui-cnt">
          <form id="delcomm" method="post">
         <ul class="user-txt-list mymsg-list fn-clear" id="xlist">
              <li class="loading"><img src="{$apicss}user/new/images/loading.gif"/>正在努力为您加载中... </li>
            </ul>
          </form>
          <!-- // i-list End -->
          <div class="user-opera fn-clear">
            <div class="check-del">
              <label class="label-checkbox" for="checkall" hidefocus="">
                <input type="checkbox" id="checkall" class="delcheckall"> 全选</label>
                  <form action="" method="post" id="delremindform">
                  <input type="hidden" value="" id="delids" name="lid">
                <a class="ui-edit ui-edit-short cleanup" href="javascript:;" data="{:zanpian_user_url('user/center/delmsg')}">删除</a>
              </form>
            </div>
           <div class="loading pagess"><ul class="pagination" id="xpage" style="float:right"></ul></div>
          </div>
          <!-- // i-do End -->
        </div>
      </div>
      <!-- // ui-box End -->
    </div>
    <!-- // i-cnt End -->

    <!-- bigbox end-->
    <script type="text/javascript">		
		function pagegoo(url){
			$.ajax({ url: url,  
				success: function(data){
					if('' != data.ajaxtxt){
						$("#xlist").html(data.ajaxtxt);
						$("#xpage").html(data.pages);
						initLabelEvent();
						$("#xpage a").click(function (e){
							pagegoo(e.target);
							return false;
						});

						$(".mdel").click(function(){
							var parents=$(this).parents('li');
							$.showfloatdiv({
								wantclose:2,
								succdo:function(r){
									parents.remove();
								},txt:'确认删除?'
							});
						});

						$(".delcheckall").click(function(){
							checkAll('');
						});
				}else{
				   $("#xlist").html('<li class="kong">您当前没有私信，朋友之间要多联系哦!</li>');
				   $(".i-do").hide();
				}
			},dataType:'json'});
			return false;				
		}
		pagegoo("{:zanpian_user_url('user/center/msg')}");
		$(".cleanup").click(function(e){
			$.showfloatdiv({
				wantclose:2,
				ispost:1,
				formid:'delcomm',
				url:"{:zanpian_user_url('user/center/delmsg')}",
				succdo:function(r){
					if(parseInt(r.rcode)==1){
						pagegoo("{:zanpian_user_url('user/center/msg')}");	
					}
				},txt:'确认删除?'
			});
		});
		$("#pids a").click(function (e){
			$(this).parent('li').nextAll().removeClass('current');
			$(this).parent('li').prevAll().removeClass('current');
			$(this).parent('li').addClass('current');
			pagegoo($(this).attr('href'));
			return false;
		});
		$(".gb-list li").click(function (){
			$(this).find("h5 strong").removeClass('read');
		});
		</script>
  </div>
  <!-- // maxBox End -->
</div>
<!-- // wrap End -->
<!-- // footer end -->
{include file="footer"/}
</body>
</html>